package com.whc.gulimall.order.feign;

import com.whc.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 会员相关远程接口
 *
 * @author angaoen
 */
@FeignClient("gulimall-member")
public interface MemberFeignService {

    /**
     * 通过memberId获取收货地址列表
     *
     * @param memberId memberId
     * @return 统一返回结果
     */
    @GetMapping("/member/memberreceiveaddress/{memberId}/receiveAddresses")
    R listReceiveAddressByMemberId(@PathVariable("memberId") Long memberId);

    /**
     * 通过attrId获取到收货地址信息
     *
     * @param id 收货地址id
     * @return MemberReceiveAddressEntity
     */
    @GetMapping("/member/memberreceiveaddress/info/{id}")
    R info(@PathVariable("id") Long id);
}
